<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>订单详情</title>
<link type="text/css" href="../css/reset.css" rel="stylesheet" />
<link type="text/css" href="../css/public.css" rel="stylesheet" />
<link type="text/css" href="../css/style.css" rel="stylesheet" />
<link type="text/css" href="../css/wode.css" rel="stylesheet" />
<script>
    var deviceWidth = Math.min(640, window.innerWidth)
    document.documentElement.style.fontSize = deviceWidth / 7.5 + "px"
</script>
 <script src="../js/jquery-3.0.0.min.js"></script>
 <script src="../js/core.js"></script>
 <script src="../js/37.0.0selldinngdandaishouhuo.js"></script>

</head>

<body>
<!-- top -->
<div class="header">
    <header class="p_header public-red">
        <a href="javascript:history.go(-1);" class="p_header_left">
            <i class="p_left" title="返回"></i>
        </a>
        <h1 class="p_dizhi" >订单详情</h1>
    </header>
</div>
<!--订单详情-->
<!--时间-->
<input type="hidden" id="tuifeioderid"/>
<div class="buy_dingdan_time" id="daishouhuoshiajian">
	<h6>订单将在<span id="day"></span>天<span id="shi">22</span>小时<span id="fen"></span>自动收货</h6>
</div>
<!--订单状态-->
<div class="public-jianxi"></div>
<div class="sell_detail_zhuang" id="dingdanzhuang">
	
</div>


<!--发货信息-->
<div class="dingdan_title">发货信息</div>
<div class="sell_detail_dizhi" id="fahuoxinxi">
	</div>


<!--物流信息-->
<div class="dingdan_title">物流信息</div>
<div class="sell_detail_wuliu" id="wuliuxinxi">
	
</div>




<!--内容-->
<div class="dingdan_title">订单信息</div>
<div class="sell_detail_tel clearfix" id="maijiaxinxi">
	
</div>
<div class="detail_goods clearfix" style="margin-bottom: 0;" id="shangpingxinxi">
   
    </div>
<div id="shangpingxinxiss"></div>
<input type="hidden" id="shijian"/>

<div class="public-jianxi"></div>
<!--footer-->
<div class="sell_detail_footer">
	<div class="sell_detail_footer_con">
		<div class="fr" id="selldingdan">
			
		</div>
	</div>
</div>


<!--退费-->
<div class="show2 sell-xiugai2">
	<h5>退费</h5>
	<h6>当前订单货款金额为<em id="ordermoylie"></em>元，邮费为<em id="yuns"></em>元</h6>
	<ul>
		<li class="clearfix">
			<label>退费(元)</label>
			<input type="number" id="tuifeijinge" value="0" />
		</li>
	</ul>
	<div class="show2_anniu clearfix">
		<span>取消修改</span>
		<span onclick="tuifeiss()">确认修改</span>
	</div>
</div>
<script type="text/javascript" src="../js/jquery-1.10.1.min.js"></script>
<script>
	// 日期，在原有日期基础上，增加days天数，默认增加1天
        function addDate(date, days) {
            if (days == undefined || days == '') {
                days = 8;
            }
            var dates = new Date(date);
            dates.setDate(dates.getDate() + days);
            
            return dates;
        }

       
	//计时器
    window.onload=function(){      
      getMyTime(); 
    }
    //1.前面补0
    function p(n){
      return n<10?'0'+n:n;
    }
    //2.倒计时
    function getMyTime(){      
      var startDate=new Date();
      var a=$("#shijian").val();
      var b = addDate(a,7);
      //alert(".."+b)
    /*  var endDate=new Date(b);*/
      var countDown=(b.getTime()-startDate.getTime())/1000;
      var day=parseInt(countDown/(24*60*60));//天
      var h=parseInt(countDown/(60*60)%24);
      var m=parseInt(countDown/60%60);
     // var s=parseInt(countDown%60);        
      document.getElementById('day').innerHTML=p(day);
      document.getElementById('shi').innerHTML=p(h);
      document.getElementById('fen').innerHTML=p(m);
      setTimeout('getMyTime()',500);
      if(countDown<=0){
      	     if(nuber!=""&&uuuuid!=""){
   	  $.ajax({
      url: urlcore+"/api/order/cancelOrder?orderNumber="+nuber+"&types=1",
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
				 window.location.href="20.0.0sell_wode.html";
				}
			},
			error: function() {
				alert("error");
			}
		});
      	     }
      	   
      	    
      }
    }	
</script>
</body>


</html>